package com.tech.repository.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 留言信息实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Message implements Serializable {
	private Integer mid;
	/**
	 * 商品编号
	 */
	private  Integer gid;
	/**
	 * 父评论ID
	 */
	private  Integer mparentid;
	/**
	 * 用户ID
	 */
	private  Integer uid;
	/**
	 * 评论内容
	 */
	private String mcontent;
	private Date mcreatetime;

	/**
	 * 基本构造器，评论内容和评论时间后续需设置
	 *
	 * @param mid       评论消息ID
	 * @param gid  商品编号
	 * @param mparentid 父评论ID
	 * @param uid   用户ID
	 */
	public Message(Integer mid, Integer gid, Integer mparentid, Integer uid) {
		this(mid, gid, mparentid, uid, null, null);
	}

	public Message(Integer mid, Integer gid, Integer mparentid, Integer uid, String mcontent) {
		this(mid, gid, mparentid, uid, mcontent, null);
	}
}
